import request from '@/utils/request'

// 生态流量设备运维管理-列表
const deviceFailureList = function (params = {}) {
  return request({
    url: `/zy-api/api/ecologicalFlowEquipment/getEquipmentFailureList`,
    method: 'post',
    data: params,
  })
}

// 取水设备运维管理基本信息-新增
const addDeviceFailure = function (params = {}) {
  return request({
    url: `/zy-api/api/ecologicalFlowEquipment/addEquipmentFailure`,
    method: 'post',
    data: params,
  })
}

// 取水设备运维管理基本信息-编辑（改变状态）
const editDeviceFailure = function (params = {}) {
  return request({
    url: `/zy-api/api/ecologicalFlowEquipment/updEquipmentFailure`,
    method: 'post',
    data: params,
  })
}

// 生态流量设备运维管理-更多详情信息查看
const deviceFailureDetails = function (params = {}) {
  return request({
    url: `/zy-api/api/ecologicalFlowEquipment/getWaterTechnologyId`,
    method: 'post',
    data: params,
  })
}

// 查看当前用户是否是运维人员
const isOperator = function (params = {}) {
  return request({
    url: `/zy-api/api/waterEquipment/getEquipmentFailureId`,
    method: 'post',
    data: params,
  })
}

export {
  deviceFailureList,
  addDeviceFailure,
  editDeviceFailure,
  deviceFailureDetails,
  isOperator
}